Skip to content

Fix: COT initial in debug mode#3

Open
Yunhao-Feng wants to merge 1 commit into
MASWorks:mainfrom
Yunhao-Feng:fix-bug-cot
Open

Fix: COT initial in debug mode#3
Yunhao-Feng wants to merge 1 commit into
MASWorks:mainfrom
Yunhao-Feng:fix-bug-cot

Conversation

@Yunhao-Feng

Copy link
Copy Markdown

🛠 Bug Fix: Compatibility Issue with method_config_name in inference.py

🐞 Problem

In the original inference.py, the MAS_METHOD is initialized using the following pattern:

mas = MAS_METHOD(general_config, method_config_name=args.method_config_name)

However, some method implementations, such as CoT, do not accept method_config_name as a constructor argument. This causes a TypeError when attempting to run inference with those methods.

Daisy-bit pushed a commit to Daisy-bit/MASLab that referenced this pull request May 25, 2026
…rate eigenvalue

P1 fixes (real / experiment-impacting bugs):

  * mad_scc code task: `_vote`/`_group_for_diag` now uses body-stripped BLEU
    for clustering (matches scc_components.voting._code_bleu_plurality).
    Previously full-code BLEU was used, so trigger (count_first_plurality,
    body-stripped) and vote (_group_for_diag, full-code) could disagree on
    cluster membership when agents used same logic with different
    docstrings. Verified: two `def add(a,b)` with different docstrings
    now correctly cluster as one group.

  * inference.py --sequential: process_sample() was called with 4 args but
    the function signature requires 5 (lock missing). Sequential mode
    crashed with TypeError immediately. Added the missing lock arg.

  * pc1_contributions: when all embeddings are identical, S_c ≈ 0 and eigh
    picks an arbitrary orthonormal basis. The leading "eigenvector" carries
    no information, but softmax(|v_1|) would give one random agent ~100%
    weight. Now detects raw_lam1 < 1e-10 and returns uniform 1/N.
    Verified: 5 identical embs now yield [0.2]*5 instead of [~1, ~0, ~0, ~0, ~0].

P2 fixes (consistency):

  * mad_scc/soo_scc pool-size handling unified to `>=`. mad_scc previously
    required strict equality (rejected oversized pools), soo_scc accepted
    and sliced. Now both accept `>=` and use the first N entries.

  * task_typing._MCQ_SOURCES now includes aqua-rat, medmcqa, medqa.
    Previously these relied on the option-pattern fallback in
    _query_looks_like_mcq, which has false-positive risk for math
    problems mentioning "(A)" patterns.

Round 3 P3+ findings deferred per "只修 P1 三条 + P2 顺手两条" decision:
  R1-MASWorks#2/MASWorks#3/MASWorks#4/MASWorks#7/MASWorks#8, R2-M2/M3/M6/M7/M8/M9/M10, R3-C2/C3/C5/C6.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant